package com.example.tse.rbhttpservice.service.goods.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.goods.model.GoodsGetSimilarInfoInfo;
//import com.rbyair.services.goods.model.GoodsGetSimilarInfoProducts;
/**
* 获取独立专场详情
* @author wliu
* edit tse
*/
public class GoodsGetSimilarInfoResponse extends RudderResponse{

private GoodsGetSimilarInfoInfo info = new GoodsGetSimilarInfoInfo();


private List<GoodsGetSimilarInfoProducts> products = new ArrayList<GoodsGetSimilarInfoProducts>();


/**
* @return info
*/
public GoodsGetSimilarInfoInfo getInfo() {
return this.info;
}

/**
* @return info
*/
public void setInfo(GoodsGetSimilarInfoInfo info) {
this.info = info;
}
/**
methodName    Info
type          GoodsGetSimilarInfoInfo
name          info
defaultType   new GoodsGetSimilarInfoInfo()
*/

/**
* @return products
*/
public List<GoodsGetSimilarInfoProducts> getProducts() {
return this.products;
}

/**
* @return products
*/
public void setProducts(List<GoodsGetSimilarInfoProducts> products) {
this.products = products;
}
/**
methodName    Products
type          List<GoodsGetSimilarInfoProducts>
name          products
defaultType   new ArrayList<GoodsGetSimilarInfoProducts>()
*/

/**


    private static void filterFor(GoodsGetSimilarInfoInfo goods) {
        if (goods.getSimilarId() == null) {
            goods.setSimilarId("");
        }
        if (goods.getName() == null) {
            goods.setName("");
        }
        if (goods.getImg() == null) {
            goods.setImg("");
        }
        if (goods.getDesc() == null) {
            goods.setDesc("");
        }
    }

    private static void filterFor(GoodsGetSimilarInfoProducts goods) {
        if (goods.getProductId() == null) {
            goods.setProductId("");
        }
        if (goods.getPrice() == null) {
            goods.setPrice("");
        }
        if (goods.getMktprice() == null) {
            goods.setMktprice("");
        }
        if (goods.getQuantity() == null) {
            goods.setQuantity("");
        }
        if (goods.getName() == null) {
            goods.setName("");
        }
        if (goods.getThumbnailPic() == null) {
            goods.setThumbnailPic("");
        }
        if (goods.getBn() == null) {
            goods.setBn("");
        }
        if (goods.getBuyerNum() == null) {
            goods.setBuyerNum("");
        }
    }

    public static void filter(GoodsGetSimilarInfoResponse goods) {
        if (goods.getInfo() == null) {
            goods.setInfo(new GoodsGetSimilarInfoInfo());
        } else {
            filterFor(goods.getInfo());
        }
        if (goods.getProducts() == null) {
            goods.setProducts(new ArrayList<GoodsGetSimilarInfoProducts>());
        } else {
            for (GoodsGetSimilarInfoProducts item : goods.getProducts()) {
                filterFor(item);
            }
        }
    }

*/

}
